package com.zx.mobile.service.proxy.noticelog;

import com.zx.mobile.domain.noticelog.NoticeLogListRequest;
import com.zx.mobile.domain.noticelog.NoticeLogListResponse;
import org.apache.commons.lang3.StringUtils;

public class NoticeLogListCommonProxy {

    /**
     * 公告列表查询
     *
     * @return
     */
    public static String checkNoticeLogRequest(NoticeLogListRequest noticeLogListRequest ) {
        if (StringUtils.isNotBlank(noticeLogListRequest.getPlatformType())) {
            if (!("A".equals(noticeLogListRequest.getPlatformType()) || "iPhone"
                    .equals(noticeLogListRequest.getPlatformType()))) {
                return "平台类型不合法";
            }
        } else {
            return "输入项必填";
        }

        return null;
    }

    /**
     * 公告列表查询
     *
     * @param noticeLogListRequest
     * @return
     */
    public static NoticeLogListResponse getNoticeLogResponse(
            NoticeLogListRequest noticeLogListRequest) {
        NoticeLogListResponse noticeLogListResponse = new NoticeLogListResponse();
        noticeLogListResponse.setReturnCode("0000");
        noticeLogListResponse.setReturnMsg("公告列表查询获取成功");
        return noticeLogListResponse;
    }
}
